import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    location:{
      "name":"北京",
      "id":"101010100",
      "lat":"39.90499",
      "lon":"116.40529",
      "adm2":"北京",
      "adm1":"北京市",
    }
  },
  getters: {
  },
  mutations: {
    updateLocationMutation(state,location){
      state.location = location
    }
  },
  actions: {
    updateLocationAction(context,location){
      context.commit("updateLocationMutation",location)
    }
  },
  modules: {
  }
})
